package com.gc.cscott.verify;

import com.gc.cscott.domain.contest.numbers.TaskNumber;
import com.gc.cscott.domain.result.TestCaseResult.HowEnded;

/**
 *
 * @author root
 */
public interface OutputVerifier {
    enum OutputStatus {
        Correct(HowEnded.Correct),
        Wrong(HowEnded.Wrong);
        HowEnded howEnded;

        private OutputStatus(HowEnded howEnded) {
            this.howEnded = howEnded;
        }

        public HowEnded getHowEnded() {
            return howEnded;
        }

    }

    class VerifiedOutput {
        OutputStatus outputStatus;
        String details;

        private VerifiedOutput(OutputStatus asnwerStatus, String details) {
            this.outputStatus = asnwerStatus;
            this.details = details;
        }

        public static VerifiedOutput outputIsCorrect(){
            return new VerifiedOutput(OutputStatus.Correct, "");
        }

        public static VerifiedOutput outputIsWrong(String whatIsWrong){
            return new VerifiedOutput(OutputStatus.Wrong, whatIsWrong);
        }
                

        public OutputStatus getOutputStatus() {
            return outputStatus;
        }

        public String getDetails() {
            return details;
        }
    }
    VerifiedOutput verifyOuput(TaskNumber taskNumber, String inputText, String outputText, String validationHintText);
}
